#!/usr/bin/env bash
# Copyright (c) 2020 The Toltec Contributors
# SPDX-License-Identifier: MIT

pkgnames=(evtest)
pkgdesc="Kernel evdev device information and monitor"
url=https://gitlab.freedesktop.org/libevdev/evtest
pkgver=1.34-3
timestamp=2020-12-30T02:52Z
section="utils"
maintainer="Linus K. <linus@cosmos-ink.net>"
license=GPL-2.0-only
makedepends=(build:automake)

image=base:v2.1
source=("https://gitlab.freedesktop.org/libevdev/evtest/-/archive/evtest-${pkgver%-*}/evtest-evtest-${pkgver%-*}.zip")
sha256sums=(62f7e34c5bab91b5015de5b056d79051c677c5bd5702facb2885f8e4ba0df84c)

build() {
    export CC=arm-linux-gnueabihf-gcc
    ./autogen.sh --host armv7
    ./configure --host armv7
    make
}

package() {
    install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/evtest
}
